﻿namespace Rialternative.Infrastructure
{
    using System;

    /// <summary>
    /// Defines a contract for simple IOC container.
    /// </summary>
    public interface IDIContainer
    {
        /// <summary>
        /// Resolves the specified type.
        /// </summary>
        /// <param name="type">The type to resolve.</param>
        /// <returns>An instance of the specified type.</returns>
        object ResolveType(Type type);

        /// <summary>
        /// Registers the type.
        /// </summary>
        /// <param name="type">The type to register.</param>
        void RegisterType(Type type);

        /// <summary>
        /// Registers the specified type by defining a property injection.
        /// </summary>
        /// <param name="type">The type to register.</param>
        /// <param name="propertyName">Name of the property.</param>
        /// <param name="propertyValue">Value of the property.</param>
        void RegisterTypePropertyInjection(Type type, string propertyName, object propertyValue);
    }
}
